package com.sabastian.springframework.context.support;

import com.sabastian.springframework.beans.BeansException;
import com.sabastian.springframework.beans.factory.support.DefaultListableBeanFactory;
import com.sabastian.springframework.beans.factory.xml.XmlBeanDefinitionReader;

/**
 * @author Ciel Phantomhive
 * @description
 * @date 2023/1/22 12:22
 */
public class ClassPathXmlApplicationContext extends AbstractXmlApplicationContext {

    private String[] configLocations;

    public ClassPathXmlApplicationContext() {
    }

    public ClassPathXmlApplicationContext(String configLocations) throws BeansException {
        this(new String[]{configLocations});
    }

    public ClassPathXmlApplicationContext(String[] configLocations) throws BeansException {
        this.configLocations = configLocations;
        refresh();
    }

    @Override
    protected String[] getConfigLocations() {
        return configLocations;
    }
}
